Use Latitude and Longitude in Geomaps
If you have latitude and longitude data that you want to use in geomaps, you can create a custom geoattribute. Geomaps support the following syntax for latitude and longitude:
- (LatitudeAttribute, LongitudeAttribute)
If you have an attribute that is already in this format, you can use it with a built-in map. If you have separate attributes, use the Expression Builder to concatenate them.
Topics on This Page
Create a Custom Geoattribute for Latitude and Longitude
- In Visualizer, click Expression Editor.
- In the Expression Builder pop-up, name the expression, then select Attribute.
- Type the expression to concatenate the base attributes.
In Advanced mode, the expression displays as follows:
- (((('(' + [Retail_Stores.Store Latitude]) + ',') + [Retail_Stores.Store Longitude]) + ')')
- Click Save. The expression displays in the Attributes list.
- Use the new expression as the geoattribute.
Alternatively, you can choose a marker layer type.
Change the Display Tooltip for a Marker
In a marker-style map, you may not want to display the latitude and longitude in the tooltip.
- In the Subject Area Attributes list, select the expression and click Edit.
- In the Expression Builder, add the attribute and a pipe symbol. The pipe symbol substitutes the value of the saved name in the tooltip.
In Advanced mode, the expression displays as follows:
- ((((([Retail_Stores.Store_Name] + '|(' + [Retail_Stores.Store Latitude]) + ',') + [Retail_Stores.Store Longitude]) + ')'))
- Save the expression, or save it under a different name.
- Add the expression as a geoattribute in the Chart Builder. The expression populates as the name in the tooltip.